#include "widget.h"
#include "ui_widget.h"
#include <QDebug>

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);

    ui->stackedWidget->setCurrentIndex(2);

    connect(ui->btnScore, &QPushButton::clicked, [=](){
       ui->stackedWidget->setCurrentIndex(1);
    });


    connect(ui->btnTab, &QPushButton::clicked, [=](){
       ui->stackedWidget->setCurrentIndex(0);
    });

    connect(ui->btnTool, &QPushButton::clicked, [=](){
       ui->stackedWidget->setCurrentIndex(2);
    });

    ui->comboBox->addItem("奔驰");
    ui->comboBox->addItem("宝马");
    ui->comboBox->addItem("拖拉机");


    connect(ui->btntlj, &QPushButton::clicked, [=](){
       ui->comboBox->setCurrentIndex(2);
    });

    ui->lbl_image->setPixmap(QPixmap("D:/selfad/alg_and_graph/qt-opengl/images/awesomeface.png"));
    // 设置动图
    // ui->lbl_image->setMovie(QPixmap("D:/selfad/alg_and_graph/qt-opengl/images/awesomeface.png"));
}

Widget::~Widget()
{
    delete ui;
}

